<template>
  <div class="setting-container">
    <div class="app-container">
      <el-card>
        <el-tabs v-model="activeName">
          <el-tab-pane label="角色管理" name="role">
            <el-button size="small" type="primary">+新增角色</el-button>
            <el-table :data="list">
              <el-table-column label="序号" type="index" width="100" />
              <el-table-column label="角色名称" prop="name" />
              <el-table-column label="描述" prop="description" />
              <el-table-column label="操作">
                <el-button size="small" type="success">分配权限</el-button>
                <el-button size="small" type="primary">编辑</el-button>
                <el-button size="small" type="danger">删除</el-button>
              </el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="公司信息" name="company">1</el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>

</template>

<script>
import { reqGetROleList } from '@/api/setting'
export default {
  data() {
    return {
      activeName: 'role',
      list: [],
      page: 1,
      pagesize: 3,
      total: 0
    }
  },
  created() {
    this.gitList()
  },
  methods: {
    async gitList() {
      const { data: { rows, total }} = await reqGetROleList(this.page, this.pagesize)
      // console.log(res)
      console.log(rows, total)
      this.list = rows
      this.total = total
    }
  }
}
</script>

<style>

</style>
